MIDO GDM: an innovative artificial intelligence-based prediction model for the development of gestational diabetes in Mexican women

Given the barriers to early detection of gestational diabetes mellitus (GDM), this study aimed to develop an artificial intelligence (AI)-based prediction model for GDM in pregnant Mexican women. Data were retrieved from 1709 pregnant women who participated in the multicenter prospective cohort study ‘Cuido mi embarazo’. A machine-learning-driven method was used to select the best predictive variables for GDM risk: age, family history of type 2 diabetes, previous diagnosis of hypertension, pregestational body mass index, gestational week, parity, birth weight of last child, and random capillary glucose. An artificial neural network approach was then used to build the model, which achieved a high level of accuracy (70.3%) and sensitivity (83.3%) for identifying women at high risk of developing GDM. This AI-based model will be applied throughout Mexico to improve the timing and quality of GDM interventions. Given the ease of obtaining the model variables, this model is expected to be clinically strategic, allowing prioritization of preventative treatment and promising a paradigm shift in prevention and primary healthcare during pregnancy. This AI model uses variables that are easily collected to identify pregnant women at risk of developing GDM with a high level of accuracy and precision.

85.12% and a specificity of 67.40% with a rate of correct classification of 71.85%. The artificial neuronal network (ANN) reached a precision of 84.4%, 77.9%, and 75.7% in the training, validation, and test data subsets, respectively. The model was then used to estimate the risk for all pregnant women included in the cohort (n = 1709), achieving a precision of 70.28% and a sensitivity of 83.26%.
A kernel density plot was generated using a bandwidth of 0.0579 to visualize the distribution of predicted values from the ANN model. The plot demonstrates a bimodal distribution, showing pregnant women with a lower risk of developing GDM concentrating on the left side of the plot and those with a higher risk concentrating on the right side (Fig. 1). The area under the receiver operating characteristic (ROC) curve on the test set was 0.8471 (95% confidence interval 0.8253-0.8689), indicating good accuracy of the model (Fig. 2).
External validation of the model showed an area under the ROC curve of 0.9308 with a precision of 86.00%, a specificity of 86.96%, and a sensitivity of 85.19%.

Discussion
The current era of digital health provides an opportunity to change traditional models of primary healthcare. We have developed a novel digital health solution, MIDO GDM, which represents the first predictive model of GDM for pregnant Mexican women that is accurate in the first trimester of pregnancy, providing an opportunity for early detection that can be utilized prior to the use of the OGTT at 24 weeks. This approach provides an opportunity to offer personalized strategies to prevent the development of diabetes in pregnancy. Using MIDO GDM, pregnant women at risk of developing GDM can be identified in the first trimester of pregnancy with a group of easy-to-obtain variables. Thus, it would be possible to establish the risk of developing GDM in the early stages of pregnancy and to promote personalized preventive actions and appropriate treatment in a timely manner. In our study, we identified nine variables that enabled the model to determine risk for developing GDM with a high level of precision, thus allowing us to propose an ANN that is simple to use and grants healthcare providers the opportunity to prioritize which patients receive preventative advice and treatment over time. Studies of early interventions (prior to pregnancy week 24) in women who are not yet diagnosed with GDM have reported promising results 35 . Among Finnish women who were < 20 weeks pregnant and at a high risk of developing GDM, those who received counselling on diet, physical activity, and weight control, and those who met with a dietician, had a significantly lower incidence of GDM compared with women who did not receive these interventions (p = 0.044) 36 . Another study that enrolled women with a BMI > 25 kg/m 2 at their first trimester found that those enrolled in a Therapeutic Lifestyle Changes program, which included diet and mild physical activity, had a significantly lower incidence of GDM compared with those who received no intervention (p = 0.009) 37 . These studies support a potential benefit to the early identification of pregnant women at high risk for developing GDM. We propose that the MIDO GDM model be used ubiquitously throughout Mexico to improve the timing and quality of interventions for the prevention of GDM, a disease that is poorly diagnosed in the population.   www.nature.com/scientificreports/ We expect that MIDO GDM will play an instrumental role in changing the way primary care and preventative medicine are delivered. As an ANN, MIDO GDM will continue to learn as it is utilized as a part of the digital health platforms currently in use in Mexico. The MIDO GDM is expected to improve healthcare guidance by physicians who use MIDO Integral and to provide risk assessments and personalized health and lifestyle recommendations for patients who access the Mi Salud Integral app.
The success of a predictive model lies in its ability to predict, learn, and generate improvements that provide real-world value. As such, MIDO GDM will be incorporated within the MIDO healthcare strategy 38,39 , which is a series of interconnected digital platforms that enable healthcare professionals to proactively prevent obesity, type 2 diabetes mellitus, hypertension, and dyslipidemia at the community level (where laboratory tests are available) 39 . This ecosystem is known as MIDO Integral, and aims to provide timely and quality healthcare that is personalized to each person's life course. For pregnant women, the MIDO Pregnancy system focuses on providing screening for diabetes, hypertension, weight gain during pregnancy, and urinary tract infections.
A diagram of the incorporation of the MIDO GDM model into the Mexican healthcare system is shown in Fig. 3. It is important that AI-based models do not merely remain conceptual but are integrated into healthcare systems. Because MIDO GDM is an ANN, the model will continuously learn as it is being used among the Mexican population within a functioning digital health ecosystem (MIDO Integral Ecosystem) 40,41 . Both healthcare professionals (via MIDO Integral) and patients (from home via the Mi Salud Integral app 42,43 ) will have access to risk assessments and personalized health and lifestyle recommendations. This information will inform healthcare guidance and patient self-care.
MIDO Pregnancy is currently utilized across 388 primary healthcare centers in 32 states in Mexico, offering personalized recommendations to both healthcare professionals and patients based on their screening test results. Recommendations are made on the basis of decision trees and are given at the end of the assessment based on the results of the screening. Screening is performed at every visit to the health center and therefore our predictive model can be used to detect the risk of GDM from the very first prenatal visit in order to provide personalized GDM-prevention strategies as early as possible. MIDO GDM will also be able to offer and receive information from the mobile application "Mi Salud Integral". We expect that the application of this strategy will benefit primary healthcare and, in a larger scope, change public policy and shift the traditional primary healthcare models in Mexico and other countries.
The MIDO GDM model is simple and easy to implement even in low-resource settings, thus enhancing the practice of precision medicine. There is increasing evidence that digital health tools have the potential to improve patient health in a variety of clinical areas for those living in low-and middle-income countries, though it is widely recognized that the opportunities to use digital health tools are underutilized 40,[44][45][46] . Under these settings, there is limited per capita spending on healthcare services, leaving many people without access to healthcare 40 .
This study had several strengths. First, we used variables with commonly and easily collected data, which made it feasible to collect sufficient data to develop this predictive model. The utilization of easily accessible data means that our model can be applied in low-resource settings, where frequent laboratory testing is not always feasible due to resource limitations. Second, we developed this model using data collected as part of a www.nature.com/scientificreports/ multicenter cohort study, in which all pregnant women received OGTT according to both national and international standards. Third, we used ANNs to develop our model, which are not only able to discover patterns and relationships in large amounts of data, they are also able to be trained to produce the desired input-output relationship by running the parameters to adjust the network behavior 47 . This gives them an advantage over conventional computing methods. Finally, our ANN model performs similarly or better than several models recently developed to provide early prediction of GDM in pregnant women. Our model had an AUC, sensitivity, and specificity of 0.8471, 83.26%, and 70.28%, respectively. A predictive model using a deep neuronal network reported respective values of 0.80, 63%, and 82% 46 . Similar values were also observed when applying a logistic regression model (AUC, 0.64-0.77; sensitivity, 58-69%; specificity, 53-86%) [48][49][50] or a random forest model (AUC, 0.777; sensitivity, 65.1%; specificity, 81.3%) 49 . This study also had several limitations. The model was based on a small set of data from Mexican women; therefore, the generalizability of the model to the entire population of Mexican women and other ethnic populations is unknown. Given the promising precision and sensitivity of the model, studies further validating this model using larger datasets are warranted. Aside from the limitations of the study, the model itself also has several limitations. First, some variables may be unavailable for some women; however, the effects of this may be minimized by imputation of the missing information. For example, although over 50% of women had missing values for glucose level at the time of their first pregnancy consultation, this variable is of great relevance for prediction. Unfortunately, in Mexico there are several barriers to routinely providing glucose testing at the first pregnancy consultation; thus, we were not surprised to see that data for this parameter were missing for many pregnant women. Considering these factors, we considered it appropriate to retain this variable by imputation of the missing information. Second, although false positives are likely, a positive readout will trigger advice on non-pharmaceutical preventative strategies that benefit all pregnant women rather than a pharmaceutical intervention. Third, tools such as MIDO GDM may not be easy for healthcare professionals to adopt. Finally, the usefulness of this tool will be dependent upon whether pregnant women successfully adopt preventative measures when advised.
In conclusion, we utilized ANNs to build a model that could predict the risk of developing GDM using variables for which data is commonly and easily collected. In building this model, we aimed to alleviate some of the uncertainty in the therapeutic decision-making process for pregnant women in Mexico and to assist physicians in making decisions related to clinical care. Multiple ANN algorithms were used to develop this model, which we expect can be used to identify at-risk pregnant women during the early stages of pregnancy, despite the limited availability of OGTT in low-resource settings. Early detection of GDM is critical for initiating timely preventative measures and successful interventions. Furthermore, it is hoped that this AI-based neural network will potentially play an instrumental role in changing the way primary care and preventative medicine is delivered.

Methods
This study was conducted to build and train a neural network AI algorithm to predict the risk of developing GDM in Mexican women using socio-demographic and clinical variables, which were considered relevant for the detection of GDM risk. All women provided written informed consent prior to participation in the CME study. The study was conducted in accordance with the Declaration of Helsinki, the International Conference on Harmonization guidelines for Good Clinical Practice, and applicable local laws and regulations. The study was registered at researchregistry.com (researchregistry7405). Data sources. The study population was derived from a prospective multicenter cohort study called CME [researchregistry7405]; this included data for 1709 pregnant women in Mexico, collected between April 2019 and May 2021. The CME study aimed to achieve detection of GDM in six primary healthcare centers in Mexico and to provide appropriate and timely care for GDM. Data were collected using standardized questionnaires for socio-demographic characteristics (address, type of medical affiliation, marital status), medical history (family and personal history of pathologies, blood type, gynecological history, medications used), regular medical visits (maternal weight, blood pressure, urine test strip [glucose/protein/pH/blood/ketones/bilirubin/nitrite/ urobilinogen/specific gravity/leukocytes], alarm signs), laboratory data (hemoglobin, hematocrit, serum platelet level, serum glucose level, lipid profile, urine pregnancy test at each trimester), pregnancy resolution (date pregnancy ended, delivery method, number of newborns, complications during delivery), and management of self-monitoring for GDM (data related to at-home glucose monitoring using a capillary glucometer provided to participants of the cohort study). All participants in this cohort were referred for GDM testing. Clinical evaluation, including a 2-h 75-g OGTT that was performed between weeks 24 and 28 of their pregnancy in accordance with International Association of Diabetes and Pregnancy Study Group criteria 51 1,51 . In this analysis, we included pregnant women without type 2 diabetes and pregnant women who were at < 36 weeks gestation from the CME cohort. Furthermore, those diagnosed with pregestational diabetes, had multiple pregnancies, or had a previous chronic disease that required their pregnancy to be monitored by secondary care were excluded.
Predictive model development. The use of AI, and ANNs specifically, has been investigated in a variety of healthcare applications, including clinical diagnosis, disease prediction and detection, risk stratification, and image analysis and interpretation [52][53][54][55]  www.nature.com/scientificreports/ decisions with a goal of moving towards value-based care 55 . We used an ANN approach to develop our predictive model, which has advantages over traditional statistical methods, including the ability to work with nonstructured and missing input data, the ability to identify complex non-linear relationships between predictive variables, parallel data processing, and the ability to learn 47,56 . A "weight" analysis can be used as a sensitivity analysis to explain relationships between input and output variables 57 . This type of analysis computes, quantitatively, the strength of connections between input and output factors. It is expected that this characteristic of the ANN approach will result in a high degree of predictive accuracy. Thus, ANN is ideal for developing a model to predict the risk of developing GDM. We took the following steps to develop our ANN model: (i) data pre-processing, (ii) building and training the model, (iii) simplifying the model, adding dropout and weight regularization to address overfitting, and (iv) hyperparameter tuning. First, all candidate predictive variables that were selected after the systematic review were included to build a base model. Then, we conducted a machine-learning variable selection method to select variables that ensured better model discrimination to create an efficient approach for clinical practice with fewer redundant variables. We evaluated variables with predictive power that could be easily collected by questionnaire and did not require laboratory measurements. This strategy was employed to ensure the model could be used in situations where laboratory measurements were not readily available. We selected nine variables for GDM prediction after reviewing 28 published studies that reported findings from cohort and case-control studies, diagnosis or assessments of GDM, or development of predictive or risk models [27][28][29][30] (listed and summarized in Table S1 and Figure S1) and in accordance with the information available for the CME study. The selected variables included maternal age (years); family history of type 2 diabetes (yes/no); previous diagnosis of hypertension (yes/no); BMI (kg/m 2 ); gestational week at first prenatal visit; parity (number); birth weight of last child (grams); type of capillary glucose measurement at first prenatal visit (random/fasting); and capillary blood glucose level at first prenatal visit (mg/dL).
Missing data for each variable were imputed with the average, bordering, or null value observed in a typical pregnancy for a Mexican woman based on information provided by the Mexico Births Information Subsystem (SINAC) for the year 2020 (Table 3) 40 . All variables were standardized using the mean and standard deviation to be included into the model. The dataset for model building was first balanced to equalize the number of women with and without GDM, and then it was divided into subsets for training (80%), validation (10%), and testing (10%). Figure 4 shows the ANN architecture of the model. The model had a single output node, defined as the GDM diagnosis (yes/no), which was modelled using an ANN approach with the following hyper-parametrization: three hidden layers of 10, 8, and 6 nodes; Rectified Linear Activation as the hidden layer activation function; sigmoid or logistics as the output activation function; and a binary cross-entropy as loss of function to measure how far away from the true value the prediction was to allow for tuning of the parameters based on this value. Next, we used Adam, an adaptive learning rate optimization algorithm and set the number of epochs (i.e., the number of times the entire training dataset is shown to the network during training) as 100 and the batch size (i.e., the number of sub-samples given to the network after the parameter update occurs) as 50 using the Early Stopping technique. Finally, we assessed the accuracy of the model to predict GDM.
After obtaining the risk predictions, we performed an analysis of the risk distribution to define the optimal cut points that would provide an ideal balance for sensitivity and specificity. Analyses were performed using the Pandas, Numpy, and Keras (backend on tensorflow) modules in Python 3.6 (Python Software Foundation, Fredericksburg, VA, USA).
External validation of the model. The model was externally validated using data collected during routine health care provided to pregnant women in Mexico City who visited the Health Units of the Maternal and Infant Research Center of the Birth Study Group (CIMIGEN [acronym in Spanish]) 82 . Data were collected from the randomly selected records of 27 pregnant women with GDM and 23 pregnant controls without GDM who had their first medical appointment at ≤ 32 weeks of pregnancy. Data related to the variables used in the model were retrieved, including maternal age, family history of type 2 diabetes, previous diagnosis of hypertension, pregestational BMI, week of pregnancy at prenatal visit, parity, birth weight of last child, type of capillary glucose measurement at first prenatal visit (random/fasting), and capillary blood glucose level at prenatal visit. The Table 3. Values used to impute missing data. BMI body mass index. † Average value reported for a typical pregnancy in Mexico. ‡ No = 0, yes = 1. § Fasting = 1 or random = 0. www.nature.com/scientificreports/ selected pregnant women were confirmed to not be part of the cohort used to develop the predictive model. The resulting database (Supplementary Data S1) was carefully reviewed, and the completeness and plausibility of the dataset were confirmed prior to running the model.

Data availability
All data collected for this study will be made available upon reasonable request to the corresponding author.   www.nature.com/scientificreports/